package com.lxy.config.demo;

import jakarta.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class YmlController {

    @Value("${mykey}")
    private String myKey;

    @PostConstruct
    public void readValue(){
        System.out.println(myKey);
    }

}
